﻿/*
 * User: Jorge
 * Date: 3/17/2010
 * Time: 10:28 PM 
 */
using System;
using System.IO;
using System.Runtime.InteropServices;

namespace Utils
{
	/// <summary>
	/// FileSystem provides simple helper functions to read and write files
	/// </summary>
	[ComVisible(true)]
	public class FileSystem : IDisposable
	{
		public void SaveToFile(string content, string filepath)
		{
			File.WriteAllText(filepath, content);
		}
		
		public string ReadFile(string filepath)
		{
			if (File.Exists(filepath))
			{
				return File.ReadAllText(filepath);
			}
			return null;			    
		}
		
		public void Dispose()
		{
			
		}
	}
}
